#ifndef _TRYEXCEPT_H_
#define _TRYEXCEPT_H_
#include "python3/PythonGrammar30TreeConstants.h"
#include "ast/stmtType.h"
#include "ast/excepthandlerType.h"
#include "ast/stmtType.h"
#include "ast/suiteType.h"
class IVisitor;
class TryExcept;
typedef QSharedPointer<TryExcept> TryExceptPtr;

class TryExcept: public stmtType
{
public:
    explicit TryExcept(const StmtTypeList& body, const ExcepthandlerTypeList& handlers, const suiteTypePtr& orelse, int nodeId=JJTBEGIN_TRY_STMT);
    virtual ~TryExcept();
    
    
    StmtTypeList body();
    void setBody(const StmtTypeList& body);
    
    ExcepthandlerTypeList handlers();
    void setHandlers(const ExcepthandlerTypeList& handlers);
    
    suiteTypePtr orelse();
    void setOrelse(const suiteTypePtr& orelse);
    
    
    virtual QString type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    StmtTypeList _body;
    ExcepthandlerTypeList _handlers;
    suiteTypePtr _orelse;
};




#endif